//
//  JMOrderInfoModel.m
//  NewiOSProject
//
//  Created by JMMac on 15.1.24.
//  Copyright © 2024 范智渊. All rights reserved.
//

#import "JMOrderInfoModel.h"



@implementation JMOrderInfoModel

-(UIImage *)iconImg{
    if (!_iconImg) {
        if (self.slogan) {
            NSData *imageData = [[NSData alloc] initWithBase64EncodedString:self.slogan options:NSDataBase64DecodingIgnoreUnknownCharacters];
            _iconImg = [UIImage imageWithData:imageData];
        }
    }
    return _iconImg;
}
-(NSString *)status{
    if (!_status) {
        _status = self.listModel.status;
    }
    return _status;
}
-(NSString *)statusString{
   
    if(self.status.intValue == 90 || self.status.intValue == 100){//En revisión 审批中
        return @"En revisión";
    }
    
    if(self.status.intValue == 150){//Depositando 放款中
        return @"Depositando";
    }
    if(self.status.intValue == 170){//Pendiente de reembolso 待还款=放款成功
        return @"Reembolso pendiente";
    }
    if(self.status.intValue == 180){//Reembolso atrasado 逾期还款
        return @"Reembolso atrasado";
    }
    if(self.status.intValue == 200){//Reembolsado 贷款结清=已还款
        return @"Reembolsado";
    }
    return @"";
}
-(NSString *)statusImgName{
    if(self.status.intValue == 90 || self.status.intValue == 100){//En revisión 审批中
        return @"shen he";
    }
    
    if(self.status.intValue == 150){//Depositando 放款中
        return @"fang kuan zhong";
    }
    if(self.status.intValue == 170){//Pendiente de reembolso 待还款=放款成功
        return @"dai huan kuan";

    }
    if(self.status.intValue == 180){//Reembolso atrasado 逾期还款
        return @"yu qi";
    }
    if(self.status.intValue == 200){//Reembolsado 贷款结清=已还款
        return @"yi huan";
    }
    
    return @"";
}

-(NSString *)pageType{
    if (self.status.intValue==90 || self.status.intValue==100 || self.status.intValue==150 || self.status.intValue==200) {
        return @"1";
    }else{
        return @"2";
    }
}

@end



@implementation delayTermItem
@end



@implementation JMExtenDetailModel

@end
